using System;
using System.Collections.Generic;
using System.Text;

namespace ClientGUI
{
    /// <summary>
    /// A read only collection.
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public class ReadOnlyCollection <T>
    {
        T [] my_items;
        /// <summary>
        /// Read the name and guess what it does
        /// </summary>
        /// <param name="items"></param>
        public ReadOnlyCollection (T  [] items) 
        {
            my_items = items;
        }
        /// <summary>
        /// Getter
        /// </summary>
        /// <param name="index"></param>
        /// <returns></returns>
        public T this[int index] { get { return my_items[index]; } }
        /// <summary>
        /// Lenght
        /// </summary>
        public int Length { get { return my_items.Length; } }
    }
}
